package com.tchy.cloud.entity;

import javax.persistence.*;

import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by xiaoji on 2017/2/20.
 */
@Entity
@Table(name = "a_studio_consultant", schema = "", catalog = "")
public class AStudioConsultantEntity {
    private Long studioConsultantId;
    private Long studioId;
//    private Long consultantId;
    private AConsultantEntity consultantEntity;
    private Integer level;
    private Date addTime;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "studio_consultant_id")
    public Long getStudioConsultantId() {
        return studioConsultantId;
    }

    public void setStudioConsultantId(Long studioConsultantId) {
        this.studioConsultantId = studioConsultantId;
    }

    @Basic
    @Column(name = "studio_id")
    public Long getStudioId() {
        return studioId;
    }

    public void setStudioId(Long studioId) {
        this.studioId = studioId;
    }

//    @Basic
//    @Column(name = "consultant_id")
//    public Long getConsultantId() {
//        return consultantId;
//    }
//
//    public void setConsultantId(Long consultantId) {
//        this.consultantId = consultantId;
//    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "consultant_id")
    public AConsultantEntity getConsultantEntity() {
        return consultantEntity;
    }

    public void setConsultantEntity(AConsultantEntity consultantEntity) {
        this.consultantEntity = consultantEntity;
    }

    @Basic
    @Column(name = "level")
    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Basic
    @Column(name = "add_time")
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

}
